load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
    name = "signal",
    srcs = [
        "exit.go",
        "signal_posix.go",
        "signal_wasm.go",
        "signal_windows.go",
    ],
    importpath = "github.com/pingcap/tidb/pkg/util/signal",
    visibility = ["//visibility:public"],
    deps = [
        "@com_github_pingcap_log//:log",
        "@org_uber_go_zap//:zap",
    ] + select({
        "@io_bazel_rules_go//go/platform:aix": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:android": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:darwin": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:dragonfly": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:freebsd": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:illumos": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:ios": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:linux": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:netbsd": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:openbsd": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:solaris": [
            "//pkg/util/logutil",
        ],
        "@io_bazel_rules_go//go/platform:windows": [
            "//pkg/util/logutil",
        ],
        "//conditions:default": [],
    }),
)
